module.exports = function($scope, $state, $stateParams, $modalInstance,$resource,$modal,toaster, item,flag){
  $scope.obj = {};
  $scope.obj1=item;
   $scope.flag=flag;
   console.log($scope.flag);
  $resource('/api/as/goc/viewAlevelApplyAd/findViewAleveApplyCountryList', {}, {}).
  save({'user_code' : $scope.obj1.user_code},function (res) {
      if (res.errcode != 0) {
          toaster.error({title:"",body:res.errmsg});
          return;
      }
      $scope.obj=res.data;
  });   
  

    $scope.cancel = function () {
      $modalInstance.close();
    }
  
}
  